<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">
    <!--<form class="layui-form" action="">-->
    <input type="hidden" name="id" value="{$res.id}" />

    <div class="layui-form-item">
        <label class="layui-form-label required">专区名称</label>
        <div class="layui-input-block">
            <input type="text" value="{$res.title}" name="title" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">专区等级</label>-->
        <!--<div class="layui-input-block ">-->
            <!--{if condition="$res"}-->
            <!--<input type="text" disabled {if condition="$res.pid"} value="二级分类"  {else} value="一级分类" {/if}      class="layui-input">-->
            <!--{else}-->
            <!--<input type="text" disabled   value="二级分类"      class="layui-input">-->
            <!--{/if}-->
        <!--</div>-->
    <!--</div>-->

    {if condition="$res.id"}
    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <input type="hidden" id="imgurlHidden" name="imgurl" value="{$res.imgurl}">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="layui-input-inline">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.src_imgurl}" id="imgurl">
                <p id="demoText"></p>
            </div>
        </div>
    </div>

    {else}

    <div class="layui-form-item">
        <label class="layui-form-label">图标</label>
        <input type="hidden" id="imgurlHidden" name="imgurl">
        <div class="layui-input-inline uploadHeadImage">
            <div class="layui-upload-drag" id="headImg">
                <i class="layui-icon"></i>
                <p>点击上传图片，或将图片拖拽到此处</p>
            </div>
        </div>
        <div class="" style="display: flex">
            <div class="layui-upload-list" style="margin-top: 5px;">
                <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl">
                <p id="demoText"></p>
            </div>
            <div class="layui-form-mid layui-word-aux">
                <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
            </div>
        </div>
    </div>
    {/if}




    <!--{if condition="$res"}-->
    <!--{if condition='$res.pid > 0'}-->
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">上级分类</label>-->
        <!--<div class="layui-input-block ">-->
            <!--<select name="pid"   >-->
                <!--{volist name='category_arr' id='v'}-->
                <!--<option {if condition="$res.pid==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>-->
                <!--{/volist}-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!--{/if}-->
    <!--{else}-->
    <!--<div class="layui-form-item">-->
        <!--<label class="layui-form-label required">上级分类</label>-->
        <!--<div class="layui-input-block ">-->
            <!--<select name="pid"   >-->
                <!--{volist name='category_arr' id='v'}-->
                <!--<option {if condition="$res.pid==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>-->
                <!--{/volist}-->
            <!--</select>-->
        <!--</div>-->
    <!--</div>-->
    <!--{/if}-->

    <div class="layui-form-item">
        <label class="layui-form-label required">显示位置</label>
        <div class="layui-input-block ">
            <select name="position"  >
                {volist name='category_position_arr' id='v'}
                <option {if condition="$res.position==$v.id"} selected {/if} value="{$v.id}">{$v.title}</option>
                {/volist}
            </select>
        </div>
    </div>



    
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>


    <!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/spearea/saveinfo.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>



</body>
</html>